﻿<%@ Page Title="" Language="C#" MasterPageFile="~/administrator/Admin.Master" AutoEventWireup="true"
    CodeBehind="PartnerSMSManager.aspx.cs" Inherits="ServerApi.administrator.PartnerSMSManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="server">
    Quản lý đối tác SMS
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Script" runat="server">
    <style type="text/css">
        .style1
        {
            width: 110px;
        }
        .style2
        {
            width: 114px;
        }
        .style4
        {
            height: 26px;
        }
        .style6
        {
            width: 114px;
            height: 26px;
        }
        .style7
        {
            width: 147px;
        }
        .style8
        {
            height: 26px;
            width: 147px;
        }
        .style9
        {
            width: 151px;
        }
        .style10
        {
            height: 26px;
            width: 151px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <strong style="font-size: 18px; text-transform: uppercase">Quan ly doi tac sms</strong>
    </div>
    <br />
    <div>
        <strong>Tìm kiếm đối tác</strong>
    </div>
    <div>
        <table>
            <tr>
                <td>
                    Tên đối tác:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtNameSearch" Width="150px"></asp:TextBox>
                </td>
                <td class="style1">
                </td>
            </tr>
            <tr>
                <td>
                    Đầu số:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtServiceidSearch" Width="150px"></asp:TextBox>
                </td>
                <td class="style1">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    Trạng thái:
                </td>
                <td>
                    <asp:DropDownList ID="ddlStatus" runat="server">
                        <asp:ListItem Value="2">Tất cả</asp:ListItem>
                        <asp:ListItem Value="1">Hoạt động</asp:ListItem>
                        <asp:ListItem Value="0">Không hoạt động</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style1">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" OnClick="btnSearch_Click" />
                </td>
                <td class="style1">
                </td>
            </tr>
        </table>
    </div>
    <div style="margin: 10px 0px 4px 0px; border-top: solid 1px red;">
    </div>
    <div>
        <strong>
            <%=title %></strong>
    </div>
    <div>
        <table>
            <tr>
                <td>
                    Tên đối tác:
                </td>
                <td class="style7">
                    <asp:TextBox runat="server" ID="txtName" Width="150px"></asp:TextBox>
                </td>
                <td>
                </td>
                <td class="style2">
                    Username
                </td>
                <td class="style2">
                    <asp:TextBox runat="server" ID="txtUsername" Width="150px"></asp:TextBox>
                </td>
                <td class="style9">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    Đầu số:
                </td>
                <td class="style7">
                    <asp:TextBox runat="server" ID="txtServiceid" Width="150px"></asp:TextBox>
                </td>
                <td>
                    (VD: 8x77)
                </td>
                <td class="style2">
                    Password
                </td>
                <td class="style2">
                    <asp:TextBox runat="server" ID="txtPassword" Width="150px"></asp:TextBox>
                </td>
                <td class="style9">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    param command_code
                </td>
                <td class="style7">
                    <asp:TextBox runat="server" ID="txtParamCommand" Width="150px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style2">
                    param message
                </td>
                <td class="style2">
                    <asp:TextBox runat="server" ID="txtParamMessage" Width="150px"></asp:TextBox>
                </td>
                <td class="style9">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style4">
                    param serviceid
                </td>
                <td class="style8">
                    <asp:TextBox runat="server" ID="txtParamServiceid" Width="150px"></asp:TextBox>
                </td>
                <td>
                </td>
                <td class="style6">
                    paramd userid
                </td>
                <td class="style6">
                    <asp:TextBox runat="server" ID="txtParamUserid" Width="150px"></asp:TextBox>
                </td>
                <td class="style10">
                </td>
            </tr>
            <tr>
                <td>
                    Danh sách ip truy cập
                </td>
                <td colspan="4">
                    <asp:TextBox runat="server" ID="txtListIP" Width="523px" Height="132px" TextMode="MultiLine"></asp:TextBox>
                </td>
                <td class="style9">
                    Cách nhau bằng dấu (,)
                </td>
            </tr>
            <tr>
                <td>
                    Class xử lý MO trả Response cho đối tác
                </td>
                <td class="style7">
                    <asp:TextBox runat="server" ID="txtClassProccessScript" Width="222px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td class="style9">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    Hoạt động:
                </td>
                <td class="style7">
                    <asp:CheckBox ID="chkStatus" runat="server" Checked="True" />
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td class="style9">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <asp:LinkButton runat="server" ID="LbtnAccept" OnClick="LbtnAccept_Click">Đồng ý</asp:LinkButton>
                </td>
                <td class="style7">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td class="style9">
                </td>
            </tr>
        </table>
    </div>
    <div style="margin: 10px 0px 4px 0px; border-top: solid 1px red;">
    </div>
    <div style="width: 100%; text-align: center;">
        <asp:GridView ID="GrvListPartner" DataKeyNames="id" Width="100%" runat="server" AutoGenerateColumns="False"
            PageSize="50" CellPadding="4" ForeColor="#333333" GridLines="Vertical" EnableModelValidation="True">
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" HorizontalAlign="center" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                        <%=stt++ %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input type="checkbox" id="chkAll" onclick="CheckUncheckAll('chk[]',this.checked);" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <input type="checkbox" id='chk' name="chk[]" value='<%# Eval("id") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="ID Đối tác">
                    <ItemTemplate>
                        <%#Eval("id")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Đối tác">
                    <ItemTemplate>
                        <%#Eval("name")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Đầu số">
                    <ItemTemplate>
                        <%#Eval("serviceid")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <%#(Eval("status").ToString().Equals("1"))?"hoạt động":"khóa"%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <a href='<%#Eval("id","PartnerSMSManager.aspx?id={0}") %>'>sửa</a>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
